<div class = "list-container" >
    <h4 class="p-3 m-0">GENERAL SETTINGS</h4>
    <div class = "card col-12" >
        <%= form_for @changeset, @action, [as: :settings, id: "settings-form", method: @method, multipart: true], fn f -> %>
            <div class="form-group row ">
                <%= input f, :name, nil, is_horizontal: true, description: "Name for the store."  %>
            </div>
            <div class="form-group row ">
                <%= input f, :sender_mail, nil, is_horizontal: true, description: "Sender email for the store."  %>
            </div>
            <div class="form-group row ">
                <%= input f, :frontend_url, nil, is_horizontal: true, description: "Frontend URL for the store."  %>
            </div>
            <div class="form-group row ">
                <%= input f, :backend_url, nil, is_horizontal: true, description: "Backend URL for the store."  %>
            </div>
            <div class="form-group row ">
                <%= input f, :seo_title, nil, is_horizontal: true, description: "SEO title for the store. It will override what you had set for the “Name” field."  %>
            </div>
            <div class="form-group row ">
                <%= input f, :hosted_payment_url, nil, is_horizontal: true, description: "Payment URL for the store."  %>
            </div>
            <div class="form-group row ">
              <label  class="col-sm-3 col-form-label">
                  <div class="label">
                      Currency
                  </div>
                  <div class="label-txt">Default currency of the store</div>
              </label>
              <div class="col-sm-9 input-group">
                <%= if @method == "put" do %>
                    <%= select f, :currency, get_currency(), value: f.data.currency, class: "form-control", disabled: true %>
                    <%= hidden_input f, :currency, class: "form-control", value: f.data.currency %>
                <% else %>
                    <%= select f, :currency, get_currency(), class: "form-control"%>
                <% end %>
              </div>
            </div>
            <%= if @changeset.data.image != nil do %>
                <div class="img-wrap col-3 p-1">
                    <%= img_tag(get_image_url(@changeset.data.image, @changeset.data), class: "img-thumbnail",) %>
                </div>
            <% end %>
            <div class="form-group row col-sm-9">
                <label class="control-label"><b> Logo </b></label>
                <%= file_input f, :image, class: "form-control file-upload__input", id: "store-logo" %>
            </div>
            <%= button("Cancel", to: general_settings_path(@conn, :index), method: "get", type: "button",
            class: "btn btn-secondary btn-outline-secondary submit-btn float-left") %>
            <%= submit "Submit", class: "btn btn-primary float-right"%>
        <% end %>
    </div>
</div>
